<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="referrer" content="no-referrer" />
  <title>TT常用网址</title>
</head>

<body>
  <div id="mainPanel" class="mainPanel"></div>

  <script type="text/javascript">
    var panelDataArr = [
      //**********

      {
        "#title": "tteamcms",
        tteamcms:
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms/-/boards",
        "tteamcms-service":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-service",
        "tteamcms-client-admin":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-client-admin",
        "tteamcms-client-app":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-client-app",
        "tteamcms-client-page":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-client-page",
        "tteamcms-client-ordering":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-client-ordering",
        "tteamcms-client-message":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-client-message",
        "tteamcms-client-assistant":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamcms-client-assistant",
        "#sub": "参考",
        腾讯文档: "https://docs.qq.com/sheet/DUXZPQ01oRnRtQ2ZM?tab=jem5um",
        ordering设计图:
          "https://rp.mockplus.cn/run/SQK_jsEdj-D1J/3h2rEAr1GJ/TQqCbHSGS?cps=expand&rps=expand&nav=1&ha=1&la=0&fc=0&out=0&rt=1",
        message设计图:
          "https://rp.mockplus.cn/run/DBBd_MHKlHF5b/AWZRZ6AEid/A0T6HP65H?cps=expand&rps=expand&nav=1&ha=1&la=1&fc=0&out=0&rt=1&dt=none&as=true",
        shopline: "https://shopline.hk/",
        "#sub-2": "测试",
        "tteamcms-ci":
          "http://jenkins-devops.tech-trans.com/job/tteamcms-ci/",
        "tteamcms-prod-ci":
          "http://jenkins-devops.tech-trans.com/job/tteamcms-prod-ci/",
        "test-admin": "https://k3s-eb.tech-trans.com.cn/tteamcms-dev/admin",
        "test-page":
          "https://k3s-eb.tech-trans.com.cn/tteamcms-dev/page/?m=TEST000005&s=TEST000005",
        "test-app":
          "https://k3s-eb.tech-trans.com.cn/tteamcms-dev/app/?m=TEST000005&s=TEST000005#/",
        "test-ordering":
          "https://k3s-eb.tech-trans.com.cn/tteamcms-dev/ordering/",
          "test-assistant":"https://k3s-eb.tech-trans.com.cn/tteamcms-dev/assistant/"
      },

      //**********
      {
        "#title": "tteamcms2",
        "#sub-1": "ordering",
        "jenkins-ci":
          "http://jenkins-devops.tech-trans.com/job/tteamcms-ordering-ci/",
        "test-admin":
          "https://k3s-eb.tech-trans.com.cn/tteamcms-ordering/admin",
        "test-ordering":
          "https://k3s-eb.tech-trans.com.cn/tteamcms-ordering/ordering",
        "#sub-2": "其他",
        SEO测试原网站:
          "https://k3s-eb.tech-trans.com.cn/tteamcms-dev/page/as-store-29",
        SEO测试域名: "https://tteamcms-seo.tech-trans.com.cn/",
      },

      //**********
      {
        "#title": "weaver lib",
        "weaver-grapesjs":
          "http://gitlab-devops.tech-trans.com/eb-rd-center/weaver-grapesjs",
        grapesjs官网: "https://grapesjs.com/docs/",
        "weaver-editor-vue":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/weaver-editor-vue",
        "weaver-editor-vue-starter":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/weaver-editor-vue-starter",
        "eaver-engine-uniapp":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/weaver-engine-uniapp",
        "weaver-engine-uniapp-starter":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/weaver-engine-uniapp-starter",
        "weaver-engine-vue":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/weaver-engine-vue",
        "weaver-engine-vue-starter":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/weaver-engine-vue-starter",
      },

      //**********
      {
        "#title": "HK-Prince",
        "hk-prince":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/hk-prince/-/boards",
        "hk-prince-service":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/hk-prince-service",
        "hk-prince-client-admin":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/hk-prince-client-admin",
        // "hk-prince-client-app":
        //   "http://gitlab-devops.tech-trans.com/eb-rd-dev/hk-prince-client-app",
        "hk-prince-client-page":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/hk-prince-client-page",
        "#sub-2": "打包/测试",
        "jenkins-ci":
          "http://jenkins-devops.tech-trans.com/job/tteamcms-pjw-ci/",
        "jenkins-prod-ci":
          "http://jenkins-devops.tech-trans.com/job/tteamcms-pjw-prod-ci/",
        "uat-admin": "https://k3s-eb.tech-trans.com.cn/hk-prince/admin",
        "uat-page":
          "https://k3s-eb.tech-trans.com.cn/hk-prince/page/?m=TEST000005&s=TEST000005#/",
        "#sub-3": "其他",
        腾讯文档: "https://docs.qq.com/sheet/DUXZPQ01oRnRtQ2ZM?tab=734cuc",
        官网: "https://www.princejewellerywatch.com",
      },

      //*************
      {
        "#title": "tteammall",
        tteammall:
          "http://gitlab-devops.tech-trans.com/eb-rd/tteammall/-/boards",
        "tteammall-service":
          "http://gitlab-devops.tech-trans.com/eb-rd/tteammall-service/-/tree/multiple-store-dev",
        "tteammall-client-admin":
          "http://gitlab-devops.tech-trans.com/eb-rd/tteammall-client-admin/-/tree/multiple-store-dev",
        "tteammall-client-app":
          "http://gitlab-devops.tech-trans.com/eb-rd/tteammall-client-app/-/tree/multiple-store-dev",
        "tteammall-client-page":
          "http://gitlab-devops.tech-trans.com/eb-rd/tteammall-client-page",
        "tteam-assistant":
          "http://gitlab-devops.tech-trans.com/eb-rd/tteam-assistant/-/tree/dev",
        "#sub": "jenkins",
        "jenkins-tteammall-multiple-store":
          "http://jenkins-devops.tech-trans.com/view/TTeamMall/job/tteammall-multiple-store-docker/",
        "jenkins-tteammall-mini-weaver":
          "http://jenkins-devops.tech-trans.com/job/tteammall-mini-weaver-docker/",
        "jenkins-tteammall-android":
          "http://jenkins-devops.tech-trans.com/job/tteammall-android/",
        "jenkins-diy 店铺装修发布":
          "http://jenkins-devops.tech-trans.com/job/tteammall-multiple-diy-cd",
        "#sub-1": "店铺装修测试环境",
        "diy-tteammall-admin":
          "http://k3s-tteamstorediy.tech-trans.eb/tteamstore-diy/admin",
        "diy-tteammall-app":
          "http://k3s-tteamstorediy.tech-trans.eb/tteamstore-diy/app/?s=UzAwMDAwMDE=&m=VEVTVDAwMDAwMQ==",
        "diy-tteammall-page":
          "http://k3s-tteamstorediy.tech-trans.eb/tteamstore-diy/page/?m=TEST000001&s=S0000001",
        "#sub-2": "设计图",
        PC设计图:
          "https://rp.mockplus.cn/run/sAfZ4JMo6AHZ_/XK9exjPut4i1/zjSBPuNBe",
      },

      //**********
      {
        "#title": "tteamWeaver",
        "tteam-weaver":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-weaver/-/boards",
        "tteam-weaver-service":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-weaver-service",
        "tteam-weaver-client":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-weaver-client",
        "tteam-weaver-app":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-weaver-app",
        "tteamweaver-ttcrm":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteamweaver-ttcrm",
        "#sub": "参考",
        TTWeaver开发文档: "https://docs.qq.com/sheet/DSmpub2JneUJaT3p5",
        tteamWeaver设计图:
          "https://rp.mockplus.cn/run/8H-YA3_7vwLv/J7l_eqyOHUnu/aGjzlvg3Z",
        参考微盟:
          "https://master.weimob.com/bos/products/mpcms/4021462166275/5kopf488kX781x50dX5km6vmx4i/pages/custom",
      },
      //**********
      {
        "#title": "grapesjs项目",
        "#sub": "mjml",
        "tteam-mjml-editor":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-mjml-editor",
        "tteam-mjml-editor-cicd":
          "http://jenkins-devops.tech-trans.com/job/tteam-mjml-editor-ci/",
        "tteam-mjml-editor-cicd-file":
          "http://172.31.3.16:8081/tteam-mjml-editor/",
        "tteam-mjml-editor-test":
          "http://172.31.3.16:8080/tteam-mjml-editor/index.html?action=mms&mode=edit&templateId=1689317139442&url=aHR0cDovLzE3Mi4zMS4zLjE2OjgyODUvc29nby1tbXMtd3MvcmVzdA==",
      },
      //**********
      {
        "#title": "其他项目",
        "#sub": "hkim",
        "tteam-hkim":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-hkim/-/boards",
        "tteam-hkim-service":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-hkim-service",
        "tteam-hkim-admin":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-hkim-admin",
        "tteam-hkim-client":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-hkim-client",
        hkim原网站: "https://hkim.org.hk/",
        "#sub-1": "",
        "tteam-prerender":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteam-prerender",
        "tteam-prerender-ci":
          "http://jenkins-devops.tech-trans.com/job/tteam-prerender-ci/",
      },
      //**********
      {
        "#title": "数据中台",
        mp: "http://gitlab-devops.tech-trans.com/eb-rd/mp/-/boards",
        "mp-service":
          "http://gitlab-devops.tech-trans.com/eb-rd/mp-service/-/tree/project/capital/master",
        "mp-client-admin":
          "http://gitlab-devops.tech-trans.com/eb-rd/mp-client-admin/-/tree/project/capital/dev",
        "mp-client-dashboard":
          "http://gitlab-devops.tech-trans.com/eb-rd/mp-client-dashboard",
        "mp-114测试-admin": "http://172.31.3.114:9212/datacenter",
        "#sub": "jenkins",
        "jenkins-mp": "http://jenkins-devops.tech-trans.com/job/mp-docker/",
      },
      //**********
      {
        "#title": "tteampos",
        "tteampos-standard":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteampos-standard",
        "tteampos-project":
          "http://gitlab-devops.tech-trans.com/eb-rd-dev/tteampos-project",
      },
      //**********
      {
        "#title": "timesheet",
        timesheet:
          "http://gitlab-devops.tech-trans.com/eb-rd/timesheet/-/boards",
        "timesheet-service":
          "http://gitlab-devops.tech-trans.com/eb-rd/timesheet-service",
        "timesheet-client-mini-app":
          "http://gitlab-devops.tech-trans.com/eb-rd/timesheet-client-mini-app",
      },
      //**********
      {
        "#title": "工具-1",
        TT日志管理: "http://efk.tech-trans.eb:5601",
        k3s发布: "https://k3s-eb.ttretail.com/",
        OA系统: "https://oa.ttoto.net/",
        timesheet: "https://timesheet.ttretail.com",
        "timesheet old": "http://tteb.tech-trans.com.cn/timesheet/",
        nexus仓库: "http://nexus-devops.tech-trans.com/",
      },
      //**********
      {
        "#title": "工具-2",
        IT工具集成: "http://it-tools.ttretail.com",
        "开发纪录-腾讯文档":
          "https://docs.qq.com/sheet/DUVZocm16bFlmWEt2?tab=4w2fm5",
        科传知识库: "https://kb.ttretail.com/",
        科传开发产品: "https://product.tech-trans.com/",
        SVN权限分配: "http://svn.tech-trans.eb/svnadmin/login.php",
        SVN重置密码: "http://172.31.3.12/svntools/svnpass.php",
        gitlab密码修改: {
          url: "http://changepassword.tech-trans.eb:8181/index.php",
          hint: "gitlab等服务的账号，可以通过密码自助平台来重设密码。",
        },
        公司邮箱: "http://webmail.ezlink.com.hk/",
      },
      //**********
    ];

    window.onload = function () {
      refresh("mainPanel", panelDataArr);
    };
  </script>

  <script type="text/javascript">
    function refresh(elId, panelDatas) {
      //*************************
      console.log(panelDatas);
      console.log(Object.keys(panelDatas[0]));
      var mainPanel = document.getElementById(elId);
      for (var idx in panelDatas) {
        var panelData = panelDatas[idx];
        var panDom = parseDom("<div class='itemPanel'></div>");

        const title = panelData["#title"];
        if (title) {
          title2Dom[title] = panDom;
          panDom.appendChild(
            parseDom(
              `<div class='panTitle' onclick='shiftPut("${title}")'>${title} <i class='panPutIcon'></i></div>`
            )
          );
        }

        for (var name in panelData) {
          const value = panelData[name];
          if (name == "#title") {
            continue;
          }
          if (name == "#sub" || name.indexOf("#sub-") >= 0) {
            panDom.appendChild(
              parseDom("<p class='subTitle'>--- " + value + "</p>")
            );
          } else {
            const info = typeof value == "string" ? { url: value } : value;
            panDom.appendChild(
              parseDom(
                `<a href= '${info.url}' title='${info.hint || ""
                }'  target='_blank' class='link'>${name}</a>`
              )
            );
          }
        }
        mainPanel.appendChild(panDom);
      }
      refreshPut();
    }

    const title2Dom = {};
    const putUpInfo = JSON.parse(localStorage.getItem("putUpInfo") || "{}");
    function refreshPut() {
      for (let title in putUpInfo) {
        const dom = title2Dom[title];
        if (!dom) continue;
        putUpInfo[title]
          ? dom.setAttribute("putUp", "")
          : dom.removeAttribute("putUp");
      }
    }
    function shiftPut(title) {
      putUpInfo[title] = !putUpInfo[title];
      refreshPut();
      localStorage.setItem("putUpInfo", JSON.stringify(putUpInfo));
    }

    function parseDom(htmlText) {
      var objE = document.createElement("div");
      //去除头尾空格，防止空格成为节点
      htmlText =
        htmlText == null ? "" : htmlText.replace(/(^\s*)|(\s*$)/g, "");
      objE.innerHTML = htmlText;
      return objE.childNodes[0];
    }
  </script>

  <style>
    body {
      position: absolute;
      width: 100%;
      height: 100%;
      margin: 0;
      display: flex;
    }

    .mainPanel {
      display: flex;
      flex-direction: column;
      flex-wrap: wrap;
      margin-left: 30px;
      margin-right: 10px;
      margin-top: 20px;
      margin-bottom: 20px;
    }

    .itemPanel {
      width: 300px;
      min-height: 20px;
      margin: 12px;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 6px;
      display: flex;
      flex-direction: column;
    }

    .panTitle {
      position: relative;
      text-align: center;
      font-size: 18px;
      margin: 0;
      color: #551a88;
      cursor: pointer;
      user-select: none;
    }

    .panPutIcon {
      position: absolute;
      right: 0;
      top: 0;
    }

    .panPutIcon::after {
      content: "↓";
      position: absolute;
      right: 0;
      top: -5px;
      font-size: 20px;
      padding: 0 0 15px 15px;
    }

    .subTitle {
      font-size: 14px;
      margin: 8px 10px 8px 0px;
      color: gray;
    }

    .link {
      text-decoration: none;
      margin: 8px 10px 8px 15px;
      font-size: 16px;
    }

    .itemPanel[putUp] .subTitle,
    .itemPanel[putUp] .link {
      display: none;
    }

    .itemPanel[putUp] .panPutIcon::after {
      content: "↑";
    }
  </style>
</body>

</html>